<template>
  <div>
    <div>你被其他兄弟调用了吗？{{respose}}</div>
  </div>
</template>

<script>
import  {EventBus}  from "../event-bus.js";
export default {
  name: 'son2',
  data(){
    return{
      respose: '没有'
    }
  },
  mounted() {
    EventBus.$on('tellSon', (msg) => {
      // A发送来的消息
      this.respose = msg;
    })
  },
  beforeDestroy () {
    EventBus.$off('tellSon')
  },
}
</script>

